﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;
using System.Configuration;

namespace Taobao.Backup
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string relatedProcessName = ConfigurationManager.AppSettings["relatedProcessName"];
            if (Process.GetProcessesByName(relatedProcessName).Length > 1)
            {
                MessageBox.Show("Taobao.Tools 应用程序正在运行，请关闭该程序后才能维护和备份数据！");
            }
            else
            {
                Application.Run(new BackupForm());
            }
        }
    }
}
